[PATCH] kcmoduleqml: simplify and improve focus handling
authorChristoph Wolk <cwo.kde@posteo.net>
Sat, 8 Feb 2025 17:21:50 +0000 (18:21 +0100)
committerAurélien COUDERC <coucouf@debian.org>
Mon, 2 Jun 2025 21:31:03 +0000 (23:31 +0200)
commit49fa780ab1e4f2a0ea072aa80ef10a6629c0370e
tree1a98e57eb882d82efce5ad3b48ff7a088a473a53
parentbda46abc44b83ec148d04a53362cc39cf3fee1dd
[PATCH] kcmoduleqml: simplify and improve focus handling

kcmoduleqml contains some old tricks to make passing focus between the
qml and qtwidgets bits, but they are fragile, and break in many cases -
especially with systemsettings adding another layer of qml. The hacks
may have been necessary in the past, but things actually work well now,
so we can essentially just set a focusProxy and be done ... as long as
we don't care about accessibility. The qml bits receive focus before the
widgets parts fully hand it over, so the first qml item receiving focus
will not be  announced over screen readers. We do care though, and thus
some special handling is still needed.

We switch to using focusProxy, and add a bit of surgery to the focus
transition so that screen readers always stay in the loop about what
things are focused. We also need a bit of special handling for the
backtab case, which doesn't quite work automatically with
activeFocusOnTab set on the qml root.

Gbp-Pq: Name upstream_6dc76c3d_kcmoduleqml-simplify-and-improve-focus-handling.patch
src/kcmoduleqml.cpp